package com.umpay.entity.consum;

import java.sql.Timestamp;
import java.util.Arrays;
import java.util.StringJoiner;

import com.umpay.entity.BaseEntity;

public class ConsumOrder extends BaseEntity{

	
	private static final long serialVersionUID = 1L;
	/**消费订单表前缀*/
	public static final String CONSUME_ORDER_TABLE_PREFIX = "T_CONSUME_ORDER_";
	/**网银消费确认前台等待：最大等待时间（65秒）*/
	public static final String CONSUME_ORDER_WAITMAXSEC = "65";
	/**网银消费确认前台等待：最大数据库查询次数10*/
	public static final String CONSUME_ORDER_MAXQUERYTIMES = "10";
	/**网银消费确认前台等待：基准每次等待时间（3秒）*/
	public static final String CONSUME_ORDER_BASEWAITSEC = "3";
	/**网银消费确认前台等待：每次等待增长因子（3秒）*/
	public static final String DELTASEC = "3";
	
	
    /***主订单状态*/
	/*** 0-创建*/
	public static final String ORDERSTATE_0 = "0"; 
	/*** 1-确认支付中*/
	public static final String ORDERSTATE_1 = "1"; 
	/*** 2-确认支付超时*/
	public static final String ORDERSTATE_2 = "2"; 
	/*** 3-确认支付失败*/
	public static final String ORDERSTATE_3 = "3";
	/*** 4：确认支付成功*/
	public static final String ORDERSTATE_4 = "4";
	/*** 5: 记账中*/
	public static final String ORDERSTATE_5 = "5";
	/*** 6: 记账超时*/
	public static final String ORDERSTATE_6 = "6";
	/*** 7: 记账失败*/
	public static final String ORDERSTATE_7 = "7";
	/*** 8：记账成功、可分账*/
	public static final String ORDERSTATE_8 = "8";
	/*** 9：支付申请超时*/
	public static final String ORDERSTATE_9 = "9";
	/*** 10：支付申请失败*/
	public static final String ORDERSTATE_10 = "10";
	/*** 11-支付申请成功*/
	public static final String ORDERSTATE_11 = "11";
	
	private String tradeNo;
	private String orderId;
	private String orderDate;
	private String merId;
	private String busiId;
	private String pproductId;
	private String bproductId;
	private String outMediaId;
	private Short outMediaType;
	private Short outAccountPro;
	private String outAccountName;
	private String outAccount;
	private String outMercustId;
	private String pagreementId;
	private Short orderType;
	private Short orderChannel;
	private Short orderState;
	private Long origAmt;
	private Long amount;
	private Long consumBalance;
	private Short actionCount;
	private Long comAmt;
	private Short comAmtType;
	private String amtType;
	private Short payType;
	private Timestamp expireTime;
	private String merPriv;
	private String trace;
	private String instId;
	private String consigneeName;
	private String consigneeAddress;
	private String consigneePhone;
	private String tradeCode;
	private String tradeDesc;
	private String remark;
	private String retUrl;
	private String notifyUrl;
	private String[] inQryOrderStates;
	private String[] currentOrderState;
	private String[] notInQryOrderStates;
    private Timestamp inTime;
    private Timestamp modTime;

	public String[] getInQryOrderStates() {
		return inQryOrderStates;
	}

	public void setInQryOrderStates(String[] inQryOrderStates) {
		this.inQryOrderStates = inQryOrderStates;
	}

	public String[] getCurrentOrderState() {
		return currentOrderState;
	}

	public void setCurrentOrderState(String[] currentOrderState) {
		this.currentOrderState = currentOrderState;
	}

	public String[] getNotInQryOrderStates() {
		return notInQryOrderStates;
	}

	public void setNotInQryOrderStates(String[] notInQryOrderStates) {
		this.notInQryOrderStates = notInQryOrderStates;
	}

	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(String orderDate) {
		this.orderDate = orderDate;
	}

	public String getMerId() {
		return merId;
	}

	public void setMerId(String merId) {
		this.merId = merId;
	}

	public String getBusiId() {
		return busiId;
	}

	public void setBusiId(String busiId) {
		this.busiId = busiId;
	}

	public String getPproductId() {
		return pproductId;
	}

	public void setPproductId(String pproductId) {
		this.pproductId = pproductId;
	}

	public String getBproductId() {
		return bproductId;
	}

	public void setBproductId(String bproductId) {
		this.bproductId = bproductId;
	}

	public String getOutMediaId() {
		return outMediaId;
	}

	public void setOutMediaId(String outMediaId) {
		this.outMediaId = outMediaId;
	}


	public Short getOutMediaType() {
		return outMediaType;
	}

	public void setOutMediaType(Short outMediaType) {
		this.outMediaType = outMediaType;
	}

	public Short getOutAccountPro() {
		return outAccountPro;
	}

	public void setOutAccountPro(Short outAccountPro) {
		this.outAccountPro = outAccountPro;
	}

	public String getOutAccountName() {
		return outAccountName;
	}

	public void setOutAccountName(String outAccountName) {
		this.outAccountName = outAccountName;
	}

	public String getOutAccount() {
		return outAccount;
	}

	public void setOutAccount(String outAccount) {
		this.outAccount = outAccount;
	}

	public String getOutMercustId() {
		return outMercustId;
	}

	public void setOutMercustId(String outMercustId) {
		this.outMercustId = outMercustId;
	}

	public String getPagreementId() {
		return pagreementId;
	}

	public void setPagreementId(String pagreementId) {
		this.pagreementId = pagreementId;
	}

	public Short getOrderState() {
		return orderState;
	}

	public void setOrderState(Short orderState) {
		this.orderState = orderState;
	}

	public Long getOrigAmt() {
		return origAmt;
	}

	public void setOrigAmt(Long origAmt) {
		this.origAmt = origAmt;
	}

	public Long getAmount() {
		return amount;
	}

	public void setAmount(Long amount) {
		this.amount = amount;
	}

	public Long getConsumBalance() {
		return consumBalance;
	}

	public void setConsumBalance(Long consumBalance) {
		this.consumBalance = consumBalance;
	}

	public Short getActionCount() {
		return actionCount;
	}

	public void setActionCount(Short actionCount) {
		this.actionCount = actionCount;
	}

	public Long getComAmt() {
		return comAmt;
	}

	public void setComAmt(Long comAmt) {
		this.comAmt = comAmt;
	}

	public Short getComAmtType() {
		return comAmtType;
	}

	public void setComAmtType(Short comAmtType) {
		this.comAmtType = comAmtType;
	}

	public String getAmtType() {
		return amtType;
	}

	public void setAmtType(String amtType) {
		this.amtType = amtType;
	}

	public Short getPayType() {
		return payType;
	}

	public void setPayType(Short payType) {
		this.payType = payType;
	}

	public Timestamp getExpireTime() {
		return expireTime;
	}

	public void setExpireTime(Timestamp expireTime) {
		this.expireTime = expireTime;
	}

	public String getMerPriv() {
		return merPriv;
	}

	public void setMerPriv(String merPriv) {
		this.merPriv = merPriv;
	}

	public String getTrace() {
		return trace;
	}

	public void setTrace(String trace) {
		this.trace = trace;
	}

	public String getInstId() {
		return instId;
	}

	public void setInstId(String instId) {
		this.instId = instId;
	}

	public String getConsigneeName() {
		return consigneeName;
	}

	public void setConsigneeName(String consigneeName) {
		this.consigneeName = consigneeName;
	}

	public String getConsigneeAddress() {
		return consigneeAddress;
	}

	public void setConsigneeAddress(String consigneeAddress) {
		this.consigneeAddress = consigneeAddress;
	}

	public String getConsigneePhone() {
		return consigneePhone;
	}

	public void setConsigneePhone(String consigneePhone) {
		this.consigneePhone = consigneePhone;
	}

	public String getTradeCode() {
		return tradeCode;
	}

	public void setTradeCode(String tradeCode) {
		this.tradeCode = tradeCode;
	}

	public String getTradeDesc() {
		return tradeDesc;
	}

	public void setTradeDesc(String tradeDesc) {
		this.tradeDesc = tradeDesc;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getRetUrl() {
		return retUrl;
	}

	public void setRetUrl(String retUrl) {
		this.retUrl = retUrl;
	}

	public String getNotifyUrl() {
		return notifyUrl;
	}

	public void setNotifyUrl(String notifyUrl) {
		this.notifyUrl = notifyUrl;
	}

	public Short getOrderType() {
		return orderType;
	}

	public void setOrderType(Short orderType) {
		this.orderType = orderType;
	}

	public Short getOrderChannel() {
		return orderChannel;
	}

	public void setOrderChannel(Short orderChannel) {
		this.orderChannel = orderChannel;
	}

    @Override
    public Timestamp getInTime() {
        return inTime;
    }

    @Override
    public void setInTime(Timestamp inTime) {
        this.inTime = inTime;
    }

    @Override
    public Timestamp getModTime() {
        return modTime;
    }

    @Override
    public void setModTime(Timestamp modTime) {
        this.modTime = modTime;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", ConsumOrder.class.getSimpleName() + "[", "]")
                .add("tradeNo='" + tradeNo + "'")
                .add("orderId='" + orderId + "'")
                .add("orderDate='" + orderDate + "'")
                .add("merId='" + merId + "'")
                .add("busiId='" + busiId + "'")
                .add("pproductId='" + pproductId + "'")
                .add("bproductId='" + bproductId + "'")
                .add("outMediaId='" + outMediaId + "'")
                .add("outMediaType=" + outMediaType)
                .add("outAccountPro=" + outAccountPro)
                .add("outAccountName='" + outAccountName + "'")
                .add("outAccount='" + outAccount + "'")
                .add("outMercustId='" + outMercustId + "'")
                .add("pagreementId='" + pagreementId + "'")
                .add("orderType=" + orderType)
                .add("orderChannel=" + orderChannel)
                .add("orderState=" + orderState)
                .add("origAmt=" + origAmt)
                .add("amount=" + amount)
                .add("consumBalance=" + consumBalance)
                .add("actionCount=" + actionCount)
                .add("comAmt=" + comAmt)
                .add("comAmtType=" + comAmtType)
                .add("amtType='" + amtType + "'")
                .add("payType=" + payType)
                .add("expireTime=" + expireTime)
                .add("merPriv='" + merPriv + "'")
                .add("trace='" + trace + "'")
                .add("instId='" + instId + "'")
                .add("consigneeName='" + consigneeName + "'")
                .add("consigneeAddress='" + consigneeAddress + "'")
                .add("consigneePhone='" + consigneePhone + "'")
                .add("tradeCode='" + tradeCode + "'")
                .add("tradeDesc='" + tradeDesc + "'")
                .add("remark='" + remark + "'")
                .add("retUrl='" + retUrl + "'")
                .add("notifyUrl='" + notifyUrl + "'")
                .add("inQryOrderStates=" + Arrays.toString(inQryOrderStates))
                .add("currentOrderState=" + Arrays.toString(currentOrderState))
                .add("notInQryOrderStates=" + Arrays.toString(notInQryOrderStates))
                .add("inTime=" + inTime)
                .add("modTime=" + modTime)
                .toString();
    }

    @Override
	public String getTableNamePrefix() {
		// TODO Auto-generated method stub
		return CONSUME_ORDER_TABLE_PREFIX;
	}
}
